package com.fowo.api.common.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
@Constraint(validatedBy = IntegerStringValidator.class)
public @interface IntegerString {
    String message() default "数值格式不正确";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
    String label() default "";
    int min() default Integer.MIN_VALUE;
    int max() default Integer.MAX_VALUE;
}
